class Ren:

    __name    = ""
    shengao = ""

    def __init__(self, n):
        self.setname(n)

    def chi(self):
        print("我在吃东西")

    def he(self):
        print("我在喝")

    def getname(self):
        return self.__name

    def setname(self, n):
        self.__name = n


class Hei(Ren):
    def chi(self):
        print("我是黄种人，在吃东西")

ya = Ren("亚子")
ya.chi()

hei = Hei("小黑")
# print(hei.getname())
hei.chi()







# zhang = Ren("张三")
# lisi = Ren("李四")

# print(zhang.name)
# print(lisi.name)

# wang = Ren("王五")
# print(wang._Ren__name)

# public    公有属性
# private   私有属性
# protected 受保护属性

